Repository navigation
Keep native Inbox delegation reads complete across host budgets - #9204
loopx-agent wants to merge 1 commit into
Conversation
Signed-off-by: LoopX Agent <[email protected]>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
托管 Agent 需要在执行前发现未完成委派和回执异常,并按实际工具容量读全请求。 未明确声明的 shell 可能截断页。单独使用 #9195 的固定 reader 预算会把已声明的大页路径降为小页。 原先 #9169 的候选实现,在外发记录只剩一条不可读、且没有下一页时,首次注意视图没有发出恢复计数。当前头在完全相同的 TypeScript 事务测试返回 unavailable_count=1,普通 Inbox 仍保留原输出。 当前提案把默认 Markdown 开场和保底 reader 限在 5,000 字节。明确声明的 64,000 字节继续经现有 capture reader 使用。注意视图终页同时携带不可读记录的异常数。 独立验证采用真实 File/SQLite 源码 CLI 和类型化事务。官方 Desktop、实时 Feishu 及 Windows 仍未在本轮复验。
改动思路 / Approach
在 Inbox 的现有 TypeScript 事务中处理摘要、精确送达和末页恢复状态。在 Markdown 适配器组合保底上限与已声明的 reader 容量。 工作摘要与完整请求继续共享原始回执与游标;读取分页沿用原执行权限。 复用 #9095 既有声明和同一不可变 capture,通过两条预算路径保全不同宿主的读取合同。
具体改动 / Changes
准确头 de5a83d,merge base d772190,13 个文件,+561/-108。当前主干 a6ffb3b 的整合预演无冲突,合并树独立通过 7 项聚焦回归。原候选的末页异常路径另用同一断言与 #9169 对照。 预算契约 按修订 de5a83d 的仓库规范核对各项要求。 目标规范
- attention-receipt · Preserve full requests unless the exact current partial result is delivered.
- terminal-unavailable · Report unavailable records including on a terminal attention page.
- profile-parity · Bound fallback responses while preserving the qualified declared reader and exact digest recovery.
关键代码讲解
- 分支预算 界定保底开场与已声明 capture reader。
- 末页异常 在无请求续页时也保留外发不可读计数。
- 部分交付摘要 读取已验证的当前部分结果并保留剩余工作。
- 原提交绑定 以当前请求和精确结果核对原送达回执。
对主干的风险 / Risks
本头实跑 75 项 Python(2 项 PowerShell 跳过)、87 项 TypeScript 和本地 quick premerge。File 和 SQLite 的已声明 64,000 字节输入均在 5 次 reader 调用内读完 23 条请求和两张逻辑页。默认 5,000 字节分支验证开场、摘要恢复、续读偏移及整页回读。 终页反例在 #9169 缺少 unavailable_count,在本头通过。精确结果旧回执与错误绑定保持全文并可区分恢复,另一 Agent 的请求游标被拒绝,外发续页不追加交付或消费。 File/SQLite 发起同一实际生成的命令,在 5,000 字节和声明 64,000 字节两支均完整重建源数据。修过的末页断言独立通过。 此次验证不是正式安装版 App 或实时飞书的采用凭据。涉及更宽的工作流验收时应继续保留这两项实际入口的证据需求。
我的整体评价 / Verdict
批准当前准确头。默认小窗、声明大窗与外发末页恢复在同一个实现入口通过测试。精确请求来源和回执消费仍由既有流程负责。可用这一个准确头承接两项早期候选的集成验收。
English verdict: APPROVE at de5a83d. Approve this exact head. It preserves the existing declared 64 KB capture route and bounds the default Inbox reads at 5 KB. The same terminal-page witness fails on the earlier proposal and passes here, and seven focused tests pass on a clean current-main integration.
Goal and delivered outcome
A managed Turn can read outstanding delegations through the existing Inbox, including the latest verified partial result and pending work. Readers can page through full incoming briefs, partial summaries, and outstanding sent requests. The Inbox checks each exact request and operation cursor against its registered scope. If the sent request record is unavailable on the final page, the response exposes the unavailable count.
This integrates the changes from #9169 and #9195 with the host reader declaration already on main in #9095.
Author Declaration
Written by model_agent · GPT-6 · OpenAI.
Required work context and operator Inbox contract
Validation
Tested candidate
de5a83d4d533571f3d8b1b38da7178087cfda82cagainst maind772190747d6d39d7f896ea37a52d518d257e571.The same UTF-8 workload was run with Codex app-server
0.171.0-alpha.13over stdio, with isolated File and SQLite stores and loopback fixture inference. Each run recovered all 24 original briefs. Reader call counts include same-capture retries and exclude the Inbox openings.Each backend produced the same call counts. The candidate's default reader responses were at most 4,999 serialized bytes. The same cursor failed across Agents with no receipt writes. The package included the verified Chat bundle and the candidate was installed into a separate test environment.
Hosted checks
The inspected release and Chat browser jobs stopped at the shared ExecutionObservationReadback assertion. The fix is already on main in #9210. Release browser job · Chat browser job
Windows reported WinError 10038 while the shared canonical fixture waited for its subprocess pipe. #9218 addresses this fixture failure and awaits native Windows CI. Windows job